<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<base href="../../../" />
		<script src="page.js"></script>
		<link type="text/css" rel="stylesheet" href="page.css" />
	</head>
	<body>
		[page:Mesh] &rarr;

		<h1>[name]</h1>

		<p class="desc">
			[name] creates a ready to go sky environment for your scenes.
		</p>

		<h2>Import</h2>

		<p>
			[name] is an add-on, and therefore must be imported explicitly.
			See [link:#manual/introduction/Installation Installation / Addons].
		</p>

		<code>
			import { Sky } from 'three/addons/objects/Sky.js';
		</code>

		<h2>Code Example</h2>

		<code>
		const sky = new Sky();<br />
		sky.scale.setScalar( 450000 );<br />

		const phi = MathUtils.degToRad( 90 );<br />
		const theta = MathUtils.degToRad( 180 );<br />
		const sunPosition = new Vector3().setFromSphericalCoords( 1, phi, theta );<br />

		sky.material.uniforms.sunPosition.value = sunPosition;<br />

		scene.add( sky );
		</code>

		<h2>Examples</h2>

		<p>[example:webgl_shaders_sky misc / objects / Sky ]</p>

		<h2>Constructor</h2>

		<h3>[name]()</h3>
		<p>
		Create a new [name] instance.
		</p>

		<h2>Properties</h2>
		<p>
		[name] instance is a [page:Mesh] with a pre-defined [page:ShaderMaterial], so every property described here should be set using [page:Uniform]s.
		</p>

		<h3>[property:Number turbidity]</h3>
		<p>
		Haziness of the [name].
		</p>
		<h3>[property:Number rayleigh]</h3>
		<p>
		For a more detailed explanation see: [link:https://en.wikipedia.org/wiki/Rayleigh_scattering Rayleigh scattering] .
		</p>
		<h3>[property:Number mieCoefficient]</h3>
		<p>
		[link:https://en.wikipedia.org/wiki/Mie_scattering Mie scattering] amount.
		</p>
		<h3>[property:Number mieDirectionalG]</h3>
		<p>
		[link:https://en.wikipedia.org/wiki/Mie_scattering Mie scattering] direction.
		</p>
		<h3>[property:Vector3 sunPosition]</h3>
		<p>
		The position of the sun.
		</p>
		<h3>[property:Vector3 up]</h3>
		<p>
		The sun's elevation from the horizon, in degrees.
		</p>

		<h2>Source</h2>

		<p>
		[link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/objects/Sky.js examples/jsm/objects/Sky.js]
		</p>
	</body>
</html>
